From: Jan D. Date: Sun, 23 Jan 2011 13:28:14 +0000 (+0100) Subject: * nsterm.m (x_set_offset): Set dont_constrain to 0 so the call to X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5087 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cb1c5ee8519415bda89ccaf6fc83a036c18dec09;p=emacs.git * nsterm.m (x_set_offset): Set dont_constrain to 0 so the call to setFrameTopLeftPoint is constrained. --- diff --git a/src/ChangeLog b/src/ChangeLog index 06fad3d4df8..fb47a0d12cd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-01-23 Jan Djärv + + * nsterm.m (x_set_offset): Set dont_constrain to 0 so the call to + setFrameTopLeftPoint is constrained. + 2011-01-23 Paul Eggert Check return values of some library calls. diff --git a/src/nsterm.m b/src/nsterm.m index 1d86b3ec866..7a812481738 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -1071,8 +1071,8 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) : f->left_pos; /* We use visibleFrame here to take menu bar into account. - Ideally we should also adjust left/top with visibleFrame.offset. */ - + Ideally we should also adjust left/top with visibleFrame.origin. */ + f->top_pos = f->size_hint_flags & YNegative ? ([screen visibleFrame].size.height + f->top_pos - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) @@ -1082,6 +1082,9 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) if (f->left_pos < 100) f->left_pos = 100; /* don't overlap menu */ #endif + /* Constrain the setFrameTopLeftPoint so we don't move behind the + menu bar. */ + f->output_data.ns->dont_constrain = 0; [[view window] setFrameTopLeftPoint: NSMakePoint (SCREENMAXBOUND (f->left_pos), SCREENMAXBOUND ([fscreen frame].size.height